package com.yk.neon.lib.util.log;

import ch.qos.logback.classic.pattern.ClassicConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;

import java.net.SocketException;

public class IpConverter extends ClassicConverter {

	@Override
	public String convert(ILoggingEvent event) {
		try {
			return IpAddressUtil.getIpAddress();
		} catch (SocketException e) {
			return null;
		}
	}

}
